package com.hspedu.collection_;

import java.util.ArrayList;
import java.util.Collection;

public class Forcollection {
    public static void main(String[] args) {
        Collection col = new ArrayList();
        col.add(new Book("三国演绎",10.6));
        col.add(new Book("小李飞刀",5.6));
        col.add(new Book("红楼梦",120.6));
        for(Object book:col){
            System.out.println(book);
        }
        for (Object o :col) {
            System.out.println(o);
        }

    }
}
